Common Data Masker Properties
There is a common set of properties and corresponding functionality that is shared across all Obfusware data maskers. Data masker properties are set using JSON. Properties can be supplied in either a JSON string or via a JSON configuration file.
Properties
-
name {
string
; required }
The name of the Obfusware data masker. Must be unique. Names should be a single word. Use camel case to combine words for easy comprehension. By convention, data masker names end with suffixMasker
.
Example:"name": "LoremIpsumMasker"
-
description {
string
; optional; default: "" }
A short description of the functionality of the data masker. Should clearly describe the masked data result and not how the result is achieved. Differentiate this masker from other masters using the same algorithm
Example:"description": "Replaces the characters of the string being masked with the '*' character"
-
trimWhiteSpace {
boolean
; optional; default:false
}
Iftrue
, trims all whitespace from the beginning and end of the original string.
Example:"trimWhiteSpace": true
-
outputCase {
enum
; optional; default:AsIs
}
The case of the masked string. One ofAsIs
,Lower
,Upper
,Title
, orInput
. TheInput
value attempts to determine the case of the original input String and match it.
Example:"outputCase": "Title"
-
isEmptyDefault {
boolean
; optional; default:false
}
Iftrue
and the string data value being masked is empty then replace with thedefaultString
value.
Example:"isEmptyDefault": true
-
defaultString {
string
; optional; default:null
}
If the defaultString is non-null and if a string value being masked isnull
orisEmptyDefault
is true, then replace with the defaultString value.
Example:"defaultString": "N/A"
-
defaultNumber {
number
; optional; default:null
}
The defaultNUmber is non-null and if a number value being masked isnull
, then replace with the defaultNumber value. Example:"defaultNumber": -1
-
defaultNumberType {
enum
; optional; default:Decimal
}
The type of thedefaultNumber
. One ofInt
,Long
,Float
,Double
,Integer
, orDecimal
. Obfusware represents these types using the Java typesInteger
,Long
,Float
,Double
,BigInteger
andBigDecimal
.
Example:"defaultNumberType": "Int"
-
algorithm {
string
; required }
The name of the algorithm used to implement the data masking for this data masker. Must be one of the Obfusware implemented algorithms
Example:"algorithm": "HashList"
Example Obfusware Data Masker JSON Configuration
{
"name": "ExampleStringMasker",
"description": "Replaces null or empty string with 'N/A', trims white space, and changes strings to Title case",
"trimWhiteSpace": true,
"outputCase": "Title",
"isEmptyDefault": true,
"defaultString": "N/A",
"algorithm": "Identity"
}